package top.fangw.tenant.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import top.fangw.common.core.entity.BaseEntityWithOutName;

/**
 * <p>
 * 用途：保存系统中包含数据库连接的数据源信息，用于初始化动态多数据源
 * </p>
 *
 * @author fangw
 * @since 2024-01-22
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("g_tbl_source_database_info")
@Schema(name = "SourceDatabaseInfo", description = "用途：保存系统中包含数据库连接的数据源信息，用于初始化动态多数据源")
public class SourceDatabaseInfo extends BaseEntityWithOutName {


    @Schema(description = "租户编号")
    @TableField("tenant_id")
    private String tenantId;

    @Schema(description = "数据源名称")
    @TableField("datasource_name")
    private String datasourceName;

    @Schema(description = "数据库名称")
    @TableField("database_name")
    private String databaseName;

    @Schema(description = "连接驱动")
    @TableField("driver_class_name")
    private String driverClassName;

    @Schema(description = "数据库连接地址")
    @TableField("url")
    private String url;

    @Schema(description = "数据库连接用户")
    @TableField("username")
    private String username;

    @Schema(description = "数据库连接密码")
    @TableField("password")
    private String password;

    @Schema(description = "是否可删除0：可删除  1：不可删除")
    @TableField("is_deletable")
    private String isDeletable;
}
